home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 2,801 to 2,900
/
aol-file-protocol-4400-2801-to-2900.zip
/
AOLDLs
/
TAWUG
/
TAWUG Disk No. 36 (SHK)
/
TAWUG.36.shk
/
ALU.DOC.AW
(
.txt
)
< prev
next >
Wrap
AppleWorks Document
|
1986-06-27
|
13KB
|
250 lines
O=====|====|====|====|====|====|====|====|====|====|====|====|====|====|====|===
Applesoft Library Utility
A)pplesoft
L)ibrary
U)tility
A Users Guide
-------------%
copyright (C) 1986, Donald R. Elton
Living Legends Software
1915 Froude St.
San Diego, CA 92107
(619) 222-3722 [ voice ]*
(619) 281-7222 [ modem -- login: guest ]
Applesoft Library Utility
ALU - Applesoft Library Utility!
===============================
:The ProDOS version of ALU and its UNIX, PC-DOS and MS-DOS ;
9equivalents are based upon the CP/M library utility made ?
=popular by RBBS's and RCP/M systems around the world. These ?
=library utility programs are used to maintain and manipulate ?
=a large data file (commonly known as an LBR file) made up of !
two or more program/data files.
Library Files
=============
=Most library files contain two or more program or data files ?
=that are somehow related to one another. By "packing" these 9
7files into one large file it makes it easier for other >
<computer users to download all of the necessary modules and 9
7information without having to worry about whether they ?
=missed out on a vital portion of your package. Once the LBR ?
=file is downloaded it can be "unpacked" (seperated back into >
<the original files) with another LU utility and used by the ?
=recipient. The following example shows how useful a program
like ALU can be:
ABC.SHEET -----------------\-
ABC.GRAPH -----------------\\7
ABC.A/R ------------------>> ABC.DATA-
ABC.A/P -----------------//,
ABC.G/L -----------------/
original files from the resulting LU file>
The ABC Company ready to be transmitted
<The only requirement is that both the sending and receiving <
:parties have a library utility program to pack/unpack the
files.
:The common denominator of all LBR files is that they have >
<the same structure, regardless of the operating system used :
8when the LBR file was created. This version of ALU has ?
=ProDOS-specific enhancements that are compatible with the LU =
;command found in the Extended Command Processor (ECP), and <
:is upward and downward compatible with the versions of LU <
used on other computers and under other operating systems.
Applesoft Library Utility
Using ALU
=========
<Since ALU allows the "packing" of many files into one large =
;file, it lends itself to manipulating multi-file programs. ?
=For example, many programs may need several utility modules, >
<help files and printer drivers. Rather than have to search ;
9through an entire Data Library for all the files you can 9
7download just the necessary LBR file and "unpack" it. =
;Packed files generated by ALU use the ProDOS file type LBR
($20).
9Note that this version of ALU does not check the type of ?
=library file before attempting to manipulate it. Use of the ?
=LBR file type is optional at present to avoid confusion with <
:other ProDOS-based programs, although Apple Computer Inc. <
:has reserved $20 in the ProDOS FILE_TYPE table as the LBR
file identifier.
9LBR files generated by ALU contain one or more ProDOS or <
:alien files and a simple directory. Whenever an existing =
;library is changed (if an individual file has been changed <
:or deleted) the library requires "reorganizing". More on
this later.
ALU operation is quite simple. There are only a few<
commands, and each is described in the following sections.
Creating An LBR File
====================
7ALU must be run from ProDOS Basic. After starting the =
program by typing "-ALU" or "BRUN ALU" the following prompt
will be displayed.
:You should then enter the command string in the following 9
7format, or just press the RETURN key to exit ALU. The 8
syntax for commands given to ALU follows this pattern.
<library file name> <command> { <optional filenames>}
Applesoft Library Utility
For example:
MYFILE.LBR U /PRODOS/FILE1 /PRODOS/FILE2 /PRODOS/FILE3
9would create an LBR file named MYFILE.LBR containing the ;
three files FILE1, FILE2 and FILE3 from the disk /PRODOS.
MYFILE.LBR T
7would list all the files contained within the LBR file
MYFILE.LBR.
ALU Commands
============
<All ALU commands are a single letter. Only one command can
be entered at a time.
>[A] Unpack all files from the LBR file. This is the same @
> as the [E] (extract) command, followed by all the file @
> names. This is much easier is all you want to do is
remove all the files.
[Q] Unpack all files in prompted mode.
>[T] List all files contained in the LBR file. Each filename @
> is listed, along with the size of the file in @
> hexadecimal bytes. If this library member was added to @
> the LBR file by the ECP version of LU or this version @
> of ALU then the ProDOS file type will also be
displayed.
[L] Same as [T].
>[E] Extract a file from the LBR file. The file(s) to be @
> extracted are entered after the LBR file name. Each @
> file will be extracted and copied to a disk file of the @
> same name. Note that only a copy of the file is @
> extracted, the original library is unchanged by this
command.
>[U] Update a library. This is also used to create new @
> libraries. File name(s) are entered after the LBR file @
> name, and each file is added to the library. Any file @
> of the same name already in the library will be deleted @
> first, otherwise just added. Updating a library always @
> increases the size of the library as new members are @
> always appended to the end of the file. Please read !
about reorganizing, below.
Applesoft Library Utility
> If the library file does not exist (creating a new one) ;
then the library will be created with 32 file slots.
>[D] Delete a file. This just marks the file within the @
> library as "deleted". The library file will not change @
> in size; it does not remove the data contained by the (
file. See reorganization, below.
>[R] Reorganizes the library. All free space (from deleted ?
= files, or existing files that were Updated) is freed @
> up, and the LBR file generally becomes smaller. Should @
> be used after a Delete or Update command. Creates a @
> temporary file called ECP.LU.....TEMP, therefore you @
> should not use this file name elsewhere. Note that a @
> lot of disk space is needed temporarily by this program @
> as it basically copies all of the active members of the @
> original LBR file into the temp file above. If the @
> copy is successful then the old file is deleted and the 9
temporary file is renamed as the new library file.
Reorganizing LBR Files
======================
:The structure of an LBR file (as described below) is very =
;simple. Because of its simplicity, files that are deleted ?
=or changed still consume space within the LBR file. Any LBR :
file must be "squeezed" whenever the library is changed.
9Deleting a file merely marks the file as "deleted" -- it =
;DOES NOT remove data contained in the LBR file; therefore, 8
6the library must be reorganized. This results in the =
;creation of a new library, the copying of all active files 9
to it, and the removal of all deleted or replaced data.
<GENERAL RULE: Reorganize after deleting a file or updating
an existing file.
LBR File Structure
==================
7The LBR file contains a simple directory at the start, =
;followed by all the data contained in the file. New files =
;are added to the end of the LBR file. The directory entry ?
=for each file points to the data and contains the length and >
<other ProDOS directory information (if the member was added 5
with the ECP version of LU or this version of ALU).
Applesoft Library Utility
Each directory entry is:
00: file status (00 = active, FE = unused, FF = deleted)
01: 11 character filename
=PLEASE NOTE that file naming and storage conventions are not ?
=the same between CP/M, MS-DOS, UNIX, and ProDOS. The former =
;three operating systems can have up to 8 characters in the ?
=filename, followed by an optional 3 character arbitrary file >
<extension. A CP/M version of ALU (usually called "LU.COM")
would be stored as:
"LU______COM" ( "_" designates a space )
<The ALU program will not change this file name format in an =
;existing LBR file or in LBR files that it reorganizes. If =
;you extract or list the members of this LBR file the above =
;file name will be displayed as "LUCOM". Some MS-DOS files >
<may start with digits; for example, "1.BAT". This filename ;
9is invalid under ProDOS, so ALU will append a "P" to the 9
7front of the file name in an attempt to create a valid
ProDOS filename ("P1BAT").
12: 16 bit offset to start of data (in 128 byte sectors)
14: 16 bit data length (in 128 byte sectors)
------------------------------------------------------------
=NOTE that the fields that follow are NOT in the standard ALU >
<specification, but are added to better support Apple ProDOS ?
=files. The presence of the following data should not affect ;
9the operation of ALU versions running on other operating
systems.
>16: ProDOS Access bits. Upon extraction, all files will be
UNLOCKed.
17: ProDOS File type.)
18: 16 bit ProDOS auxiliary file type./
20: 16 bit ProDOS date of last modification./
22: 16 bit ProDOS time of last modification.%
24: 24 bit ProDOS End of File mark2
31: 16 bit value $A2A2 (for Apple 2 of course!)
=This tells ALU that the file contains valid ProDOS directory
information in bytes 16-32.
Applesoft Library Utility
------------------------------------------------------------
:Since the original program was written in BDS C, all file >
<offsets and lengths are in multiples of 128 bytes (the CP/M =
;"sector size"). ALU multiplies these values by 128 before ;
9using. All file sizes are rounded up to the nearest 128
bytes.
5The offset is the location of the data for the file, (
relative to the start of the LBR file.
8The first directory entry is the directory itself. The <
:filename is always blank, the offset is not used, and the (
length is the length of the directory.
Peculiarities
=============
<A side effect of the original design: all files are rounded >
<up to the nearest 128 bytes. This does not matter for most >
<files, but some files -- a spreadsheet, for example -- will =
;not work unless the size is exactly right. Files added to :
the LBR file by ALU will not have this problem since ALU8
6keeps up with the programs' correct EOF (end of file)
position.
=If you're using ALU to archive files it's a good idea to use ?
=the SQ utility (under development for ProDOS ECP) to squeeze >
<the files before placing them in a library file. Squeezing ?
=a LBR file can be done, but may not be reliable. Best to SQ
first, then run ALU.
;An additional note: due to the methods used by CompuServe 6
4to store files, none of the LBR files in their Data :
8Libraries are squeezed. This seems to be unique to CIS <
:only, and does not necessarily apply to files on bulletin
board systems.
Further Information
===================
8ALU is distributed as a Public Domain program by Living <
:Legends Software. We strongly encourage our fellow Apple >
<users to spread this program around to their friends and to ?
=other BBS systems so that others can enjoy the benifits that =
;come from combining numerous files into one large, easy to
handle LBR file.
Applesoft Library Utility
=Questions regarding ALU can be forwarded to us in San Diego,
or you can leave E-mail on:
CompuServe 75746,2550
Delphi LIVLEG
BIX jerryh)
ARPA !bang!crash!jerryh@nosc
ProLine [sol] jerryh, delton
Formatted for Appleworks by Bill Cronister,
The AppleWorks Users Group,
P.O. Box 24869
Denver, CO 80224-0869